package com.nbsaas.boot.merchant.rest.convert;

import com.nbsaas.boot.merchant.data.entity.MerchantReview;
import com.nbsaas.boot.merchant.api.domain.request.MerchantReviewRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 商家评价请求对象转换成实体对象
*/

public class MerchantReviewEntityConvert  implements Converter<MerchantReview, MerchantReviewRequest> {

    @Override
    public MerchantReview convert(MerchantReviewRequest source) {
        MerchantReview result = new MerchantReview();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

